package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 原因关联关系表 实体类
 * 表名：ra_reason_linked
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "ra_reason_linked")
public class RaReasonLinked implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 原因主键
     */
    @Column(name = "reason_id", nullable = false)
    private Long reasonId;
    
    /**
     * 节点主键
     */
    @Column(name = "node_id", nullable = false)
    private Long nodeId;
    
    /**
     * 关联类型（1、偏离 4、操作）
     * 默认值: 1
     */
    @Column(name = "linked_type", nullable = false)
    private Byte linkedType;
    
    /**
     * 关联偏离或操作主键
     */
    @Column(name = "linked_id", nullable = false)
    private Long linkedId;
    
    /**
     * 关联名称
     */
    @Column(name = "linked_name", length = 256)
    private String linkedName;
    
    @Override
    public String toString() {
        return "RaReasonLinked{" +
            "id=" + id +
            ", reasonId=" + reasonId +
            ", nodeId=" + nodeId +
            ", linkedType=" + linkedType +
            ", linkedId=" + linkedId +
            ", linkedName=" + linkedName +
        '}';
    }
} 